<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MVCWeb.Models.Ads>>" %>

<%@ Register Src="~/Views/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="mmuc" %>

<%@ Register Src="~/Views/Shared/LogOnUserControl.ascx" TagName="LogOnUserControl" TagPrefix="louc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <louc:LogOnUserControl ID="LogOnUserControl1" runat="server" />
    <!-- BEGIN: MainMenu -->
    <mmuc:MainMenu ID="MainMenu1" runat="server" />
    <!-- END: MainMenu -->
    <br />
    <br />
    <% foreach (var item in Model)
       { %>
    <p>
        <span style="color: #97130C; font-size: 12pt; font-weight: bold">
            <%= item.Type %><br />
            <span style="font-size: 10pt">
                <%= item.Description %></span> </span>
    </p>
    <% foreach (var subItem in item.VendorCommunityAds)
       { %>
    <% if (subItem.AdsId == 1)
       { %>
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
        <tr>
            <td style="width: 1%" valign="top">
                <img width="160px" src="<%= Url.Content("~/" + subItem.Vendor.LogoUrl) %>" alt="" />
            </td>
            <td style="width: 100%" valign="top">
                <table cellpadding="2" cellspacing="1" border="0" width="100%">
                    <tr>
                        <td style="color: #000000">
                            <b>
                                <%= subItem.Vendor.VendorName%></b>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= subItem.Vendor.Description%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= subItem.Vendor.Address1%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= subItem.Vendor.Address2%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <br />
                            Phone:
                            <%= subItem.Vendor.Phone%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Fax:
                            <%= subItem.Vendor.Fax%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <br />
                            <b>
                                <%= subItem.Vendor.CEOEmail%></b>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>
                                <%= subItem.Vendor.WebSite%></b>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <hr />
            </td>
        </tr>
    </table>
    <br />
    <br />
    <br />
    <% }
       else if (subItem.AdsId == 2)
       { %>
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
        <tr>
            <td style="width: 100%" valign="top">
                <table cellpadding="2" cellspacing="1" border="0" width="100%">
                    <tr>
                        <td style="color: #000000">
                            <b>
                                <%= subItem.Vendor.VendorName%></b>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= subItem.Vendor.Description%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= subItem.Vendor.Address1%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%= subItem.Vendor.Address2%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Phone:
                            <%= subItem.Vendor.Phone%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Fax:
                            <%= subItem.Vendor.Fax%>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>
                                <%= subItem.Vendor.CEOEmail%></b>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <b>
                                <%= subItem.Vendor.WebSite%></b>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <hr />
            </td>
        </tr>
    </table>
    <br />
    <br />
    <br />
    <% }
       else if (subItem.AdsId == 3)
       { %>
    <table cellpadding="4" cellspacing="0" border="0" width="100%">
        <tr>
            <td style="width: 100%" valign="top">
                <table cellpadding="2" cellspacing="1" border="0" width="100%">
                    <tr>
                        <td style="color: #000000">
                            <b>
                                <%= subItem.Vendor.VendorName%><br />
                                <%= subItem.Vendor.Phone%>,
                                <%= subItem.Vendor.CEODesc%>,
                                <%= subItem.Vendor.CEOEmail%>,
                                <%= subItem.Vendor.WebSite%></b>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <hr />
            </td>
        </tr>
    </table>
    <% } %>
    <% } %>
    <% } %>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
<title>Preferred Vendors</title>
</asp:Content>
